const getAverage = (sum: any, length: number) => {
    if (typeof length !== 'number' || length === 0) return '--';
    if (isNaN(sum)) return '--';
    if (Number(sum) === 0) return '--';
    return (Number(sum) / length).toFixed(2);
};

export default getAverage
